from django.contrib.auth.models import AbstractUser
from django.db import models

# Create your models here.


class User(AbstractUser):
    mobile = models.CharField(max_length=32, unique=True)
    icon = models.ImageField(upload_to='icon', default='icon/default.png')  # 需要配media文件夹


class Book(models.Model):
    name = models.CharField(max_length=32)

    # def __str__(self):
    #     return self.name
    class Meta:
        verbose_name = '书'
        verbose_name_plural = '书'


class Car(models.Model):
    name = models.CharField(max_length=32)

    # def __str__(self):
    #     return self.name